<template>
  <div class="pageSty" v-if="isShow">
    <div class="content">
      <div class="imgBox">
        <img src="@/static/imgs/home/jcwq.png" class="bgImgBorder" :class="actived ? 'isactived' : ''" />
        <img src="@/static/imgs/home/dylogo.png" class="bgImg" :class="actived ? 'isactived' : ''" />
      </div>
      <div class="title">正在检测你的抖音账号<span class="dot">...</span></div>
      <div class="douyin">抖音号：{{ douyinId }}</div>
    </div>
  </div>
  <van-overlay :show="isShow" duration="1000" z-index="100" />
</template>
<script setup>
import { ref } from 'vue'
defineProps({
  isShow: Boolean,
  douyinId: String
})


</script>
<style lang="less" scoped>
.dot {
  font-family: simsun;
  /*固定字体避免设置的宽度无效*/
  animation: dot 1.5s infinite step-start;
  display: inline-block;
  vertical-align: bottom;
  /*始终让省略号在文字的下面*/
  overflow: hidden;
}

@keyframes dot {

  /*动态改变显示宽度, 但始终让总占据空间不变, 避免抖动*/
  0% {
    width: 0;
    margin-right: 1.5em;
  }

  33% {
    width: .5em;
    margin-right: 1em;
  }

  66% {
    width: 1em;
    margin-right: .5em;
  }

  100% {
    width: 1.5em;
    margin-right: 0;
  }
}

.pageSty {
  position: fixed;
  width: 100%;
  min-height: 100%;
  z-index: 1000;
  animation: Fade 1.5s;

  .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: transparent !important;

    .imgBox {
      width: 100%;
      position: relative;
      margin-top: 400rpx;
      text-align: center;
    }

    .bgImg {
      // position: absolute;
      z-index: 200;
      width: 235rpx;
      height: 235rpx;
    }

    @keyframes box-ani {
      from {
        transform: rotate(0)
      }

      to {
        transform: rotate(360deg)
      }
    }

    .bgImgBorder {
      position: absolute;
      top: -13%;
      left: 30%;
      width: 300rpx;
      height: 300rpx;
      animation: box-ani 8s infinite linear;
      z-index: 500;

    }

    .title {
      height: 64rpx;
      font-size: 48rpx;
      font-weight: 600;
      color: #FFF;
      margin: 64rpx 0 20rpx;
    }

    .douyin {
      height: 41rpx;
      font-size: 32rpx;
      color: #FFF;
      line-height: 38rpx;
    }
  }
}

@keyframes Fade {
  0% {
    opacity: 0;
  }

  20% {
    opacity: 0.2;
  }

  50% {
    opacity: 0.5;
  }

  80% {
    opacity: 0.8;
  }

  100% {
    opacity: 1;
  }
}
</style>